import Vue from 'vue'
import Router from 'vue-router'
import login from '../views/login/index.vue'
import main from '../views/mian/index.vue'
import user from '../views/user/index.vue'
import department from '../views/department/department.vue'
Vue.use(Router)

export default new Router({
  routes: [
    {
     path:'/',
     redirect: '/login'
    },
    {
      path:'/login',
      //component:()=>import('../views/login')
      component:login
    },{
      path:'/main',
      //component:()=>import('../views/login')
      component:main,
      children:[{
        path:'/users',
        component:user
      },{
        path:'/departments',
        component:department
      }
    ]
    },
  ]
})
